/*
 * @Description: Test_Function
 * @Author: rendc
 * @Date: 2024-09-03 15:20:13
 * @LastEditors: rendc
 * @LastEditTime: 2024-09-03 15:42:15
 */
public class Test_Function{
  // main 方法
  public static void main(String[] args){
    int result = getSum(20,30);
    System.out.println("result: " + result);
    double avgResult = getAvg(1,2,3);
    System.out.println("avgResult: " + avgResult);
  }
  // 定义一个方法 求两个整型数之和
  public static int getSum(int a,int b){
    return a + b;
  }
  public static double getSum(int a,double b){
    return a + b;
  }
  // 定义一个方法 求三个整型数的平均值 
  public static double getAvg(int a,int b,int c){
    return (a + b + c) / 3;
  }
}